<!-- <template>
  <div class="app-container">
    <ul> -->
      <!-- router-link 是用来实现路由跳转 -->
      <!-- <li><router-link to="/dashboard">首页</router-link></li>
      <li><router-link to="/login">登录</router-link></li>
    </ul> -->
    <!-- router-view 是用来显示路由对应的内容 -->
    <!-- <router-view />
  </div>
</template> -->

<template>
  <div>
    <h1>测试axios二次封装</h1>
  </div>
</template>

<script setup lang="ts">
import request from '@/utils/request';
import {onMounted} from 'vue';

// 当组件挂载完毕测试发一个请求
onMounted(()=>{
  request({
    url:'/user/login',
    method:'post',
    data:{
      username:'admin',
      password:'111111'
    }
  }).then(res=>{
    console.log(res);
    
  })
})
</script>

<style scoped>

</style>
